#ifndef __INC__SPO2_DRIVER_H
#define __INC__SPO2_DRIVER_H
#include "app_io.h"
#include "app_uart.h"
#include <stdio.h>
#include <string.h>
#include "fifo.h"
#define UART_DATA_LEN                       (13)
#define UART_ID                             APP_UART_ID

#define SPO2_UART_ID                         APP_UART_ID_2
#define SPO2_UART_BAUDRATE                   115200
#define SPO2_UART_TX_IO_TYPE                 APP_IO_TYPE_GPIOA
#define SPO2_UART_RX_IO_TYPE                 APP_IO_TYPE_GPIOA
#define SPO2_UART_TX_PIN                     APP_IO_PIN_8
#define SPO2_UART_RX_PIN                     APP_IO_PIN_9
#define SPO2_UART_TX_PINMUX                  APP_IO_MUX_1
#define SPO2_UART_RX_PINMUX                  APP_IO_MUX_1
#define SPO2_UART_TX_PULL                    APP_IO_NOPULL
#define SPO2_UART_RX_PULL                    APP_IO_PULLUP




extern uint8_t *spo2_head;
extern uint8_t *spo2_tail;
extern uint8_t g_ring_buffer[200];
void spo2_usart_init(void);
void handle_spo2_data(void);
unsigned char  send_spo2_data_to_ble(void);
void app_uart_demo(void);
unsigned char get_PR_value(void);
unsigned char get_SpO2_value(void);
unsigned char get_PI_value(void);
#endif

